package com.example.graphic.model.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

// 分页结果封装
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageResult<T> {
    private long total;
    private int page;
    private int size;
    private List<T> list;
    
    public static <T> PageResult<T> success(List<T> list, long total, int page, int size) {
        return new PageResult<>(total, page, size, list);
    }
}